﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApp3
{
    public class Context
    {
        private Factory Factory; 
        public Context(int type)
        {
            switch (type) 
            {
                case 0:
                    Factory = new TomatoScrambledEggsFactory();
                    break;
                case 1:
                    Factory = new ShreddedPorkWithPotatoesFactory();
                    break;
                case 2:
                    Factory = new MincedMeatEggplantFactory();
                    break;    
            }    
        }

        public void Print()
        {
            Factory.CreateFoodFactory().Print();
            //Food food = Factory.CreateFoodFactory();
            //food.Print();
        }

    }
}
